package com.ada.mapper;

import com.ada.annoations.Delete;
import com.ada.annoations.Insert;
import com.ada.annoations.Select;
import com.ada.annoations.Update;
import com.ada.pojo.User;

import java.util.List;

public interface IUserMapper {
    @Select("select * from user")
    public List<User> findAll();
    @Select("select * from user where id=#{id}")
    public User findUserById(Integer id);
    @Insert("insert into user values(#{id},#{username})")
    public Integer insert(User user);
    @Update("update user set username= #{username} where id=#{id}")
    public Integer update(User user);
    @Delete("delete from user where id=#{id}")
    public Integer delete(Integer id);
}
